package com.autumn.platform.dao.schema.parser;

import org.apache.ibatis.session.Configuration;
import org.springframework.core.io.Resource;
import org.w3c.dom.Document;

import com.autumn.platform.core.xml.XmlHolder;
import com.autumn.platform.core.xml.context.IXmlParserContext;

public class DefaultSchemaSqlMapperParser implements ISchemaSqlMapperParser {

    @Override
    public void parse(IXmlParserContext context, final Configuration configuration, Resource resource) {
        Document document = XmlHolder.buildDocument(context, resource);
        SchemaSqlMapperParserDelegate delegate = new SchemaSqlMapperParserDelegate(configuration, context, document, resource);
        delegate.parse();
    }
}
